
test5to3(
'var numbers, list = [i for (i in numbers)];',

'var numbers, list;\n\
list = function(a) {\n\
	var i;\n\
	for (i in numbers)\n\
		a.push(i);\n\
	return a;\n\
}([ ]);'
);


test5to3(
'var numbers, doubled = [i * 2 for each (i in numbers)];',

'var numbers, doubled;\n\
doubled = function(a) {\n\
	var i, b;\n\
	for (b in numbers) {\n\
		i = numbers[b];\n\
		a.push(i * 2);\n\
	}\n\
	return a;\n\
}([ ]);'
);


test5to3(
'var numbers, evens = [i for each (i in numbers) if (i % 2 == 0)];',

'var numbers, evens;\n\
evens = function(a) {\n\
	var i, b;\n\
	for (b in numbers) {\n\
		i = numbers[b];\n\
		if (i % 2 == 0)\n\
			a.push(i);\n\
	}\n\
	return a;\n\
}([ ]);'
);
